package com.yulongtian.offers.day202208.day20220826;

/**
 * https://leetcode.cn/problems/shu-zu-zhong-zhong-fu-de-shu-zi-lcof
 * @author YulongTian
 * @date 2022/8/26 - 9:14
 */
public class Test01 {
    public static void main(String[] args) {

    }

    public int findRepeatNumber(int[] nums) {
        int n=nums.length;
        int[] arr=new int[n];
        for(int i=0;i<n;i++){
            arr[nums[i]]++;
            if(arr[nums[i]]>1){
                return nums[i];
            }
        }
        return 0;
    }

}
